home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
v cisle
/
acehtml
/
acehtmlfreeware.exe
/
scriptdef
/
Logo Fader.sd
< prev
next >
Wrap
INI File
|
2004-06-28
|
5KB
|
180 lines
[SUBJECT]
Description=Fade any image horizontally and vertically
ImageIndex=-1
Folder=Graphical Effects
[BODY_TEXT]
;<a name="logoAnchor"> </a>
;<div id="logo" style="position:absolute;visibility:visible;">
;<img name="logoIm" src="`image`" width=`width` height=`height`>
;</div>
;
;<!-- This script and many more are available free online at -->
;<!-- The JavaScript Source!! http://javascript.internet.com -->
;<!-- Original: Bob Simpson (webmaster@maryjanebrown.net) -->
;<!-- Web Site: http://www.maryjanebrown.net/webmaster -->
;
;<script language="JavaScript1.2">
;
;<!-- Begin
;var myLogo, logoWidth, logoHeight, halfHeight, windowWidth, halfWidth, cliplogoHeightor;
;var b;
;function BrowserCheck() {
; b = navigator.appName;
;if (b == "Netscape") this.b = "NS";
;else if (b == "Microsoft Internet Explorer") this.b = "IE";
;else this.b = b;
;this.v = parseInt(navigator.appVersion);
;this.NS = (this.b == "NS" && this.v >= 4);
;this.NS4 = (this.b == "NS" && this.v == 4);
;this.NS5 = (this.b == "NS" && this.v == 5);
;this.IE = (this.b == "IE" && this.v >= 4);
;this.IE4 = (navigator.userAgent.indexOf('MSIE 4') > 0);
;this.IE5 = (navigator.userAgent.indexOf('MSIE 5') > 0);
;if (this.IE5 || this.NS5) this.VER5 = true;
;if (this.IE4 || this.NS4) this.VER4 = true;
;this.oldVer = (! this.VER5 && ! this.VER4) ? true : false;
;this.min = (this.NS || this.IE);
;}
;is = new BrowserCheck();
;myLogo = (is.NS4) ? document.layers["logo"] : document.all["logo"].style;
;logoWidth = (is.NS4) ? document.logo.document.logoIm.width : document.logoIm.width;
;logoHeight = (is.NS4) ? document.logo.document.logoIm.height : document.logoIm.height;
;halfHeight = logoHeight / 2;
;windowWidth = (is.NS4) ? window.innerWidth - 16 : document.body.offsetWidth - 20;
;halfWidth = logoWidth / 2;
;cliplogoHeightor = (is.NS4) ?
;'myLogo.clip.top = 0;' +
;'myLogo.clip.right = right;' +
;'myLogo.clip.bottom = logoHeight;' +
;'myLogo.clip.left = left; '
;:
;'str="rect(0 " + right + " " + logoHeight + " " + left + ")";' +
;'myLogo.clip = str; ';
;var clipLogoVert = (is.NS4) ?
;'myLogo.clip.top = up;' +
;'myLogo.clip.right = logoWidth;' +
;'myLogo.clip.bottom = dn;' +
;'myLogo.clip.left = 0; '
;:
;'str="rect(" + up + " " + logoWidth + " " + dn + " 0)";' +
;'myLogo.clip = str;';
;var right = logoWidth, left = 0;
;var cnt = 0, up = halfHeight, dn = halfHeight, upDown;
;// --------------- User modifiable variables ----------------------
;
;//if useAnchorPosition is true logo will be positioned where you put the "logoAnchor"
;//set to false to center logo - also set myLogo.top to desired position
;
;var useAnchorPosition = false; // set to false to set your own logo position below
;if (! useAnchorPosition) {
;myLogo.left = ((windowWidth / 2) - (logoWidth / 2)); // centers logo - comment out if using line below
;//myLogo.left = 100; // remove '//' to set left position
;myLogo.top = `top`; // sets logo top
;}
;var scrollInc = 5; // sets # of pixels to scroll in 1 time frame
;var scrollSpeed = `delay`; // sets the scroll speed
;// ------------------------------------------------------------------
;function scrollLogo() {
;if (cnt == 0) {
;up-- ; dn++;
;if (up < -10) {
;right = logoWidth;
;left = 0;
;upDown = -scrollInc;
;cnt++;
;}
;eval(clipLogoVert);
;}
;if (cnt == 1) {
;right += upDown;
;left -= upDown;
;if (right < halfWidth-40) {
;right = halfWidth;
;left = halfWidth;
;upDown = scrollInc;
;cnt++;
;}
;eval(cliplogoHeightor);
;}
;if (cnt == 2) {
;right += upDown;
;left -= upDown;
;if (right > logoWidth+20) {
;right = logoWidth;
;left = 0;
;up = 0;
;dn = logoHeight;
;cnt++;
;}
;eval(cliplogoHeightor);
;}
;if (cnt == 3) {
;up++;
;dn--;
;if (dn < halfHeight - 10) {
;up = halfHeight;
;dn = halfHeight;
;right = logoWidth;
;left = 0;
;upDown = scrollInc;
;cnt = 0;
;}
;eval(clipLogoVert);
;}
;setTimeout("scrollLogo()", scrollSpeed);
;}
;if (! is.oldVer)window.onload = init;
;function init() {
;positionLogo();
;scrollLogo();
;}
;var L, T;
;var pos = (is.NS4) ? pos = document.anchors['logoAnchor'] : document.all['logoAnchor'];
;var posStr = (is.NS4) ? 'L = pos.x ; T = pos.y' : 'L = pos.offsetLeft; T = pos.offsetTop';
;function positionLogo() {
;if (! useAnchorPosition) return;
;eval(posStr);
;myLogo.top = T;
;myLogo.left = L;
;}
;// End -->
;</script>
;
[`image`]
Kind=U
Value=image1.gif
[`width`]
Kind=N
Value=500
[`height`]
Kind=N
Value=50
[`delay`]
Kind=N
Value=10
[`top`]
Kind=N
Value=100